package de.le.mfw.server.model
import javax.jdo.annotations._
import org.datanucleus._

@PersistenceCapable
class User(
  @Persistent var nick: String,
  @Persistent var hashedPassword: String,
  @Persistent var email: String,
  @Persistent var activationToken: String) {

  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  var id: java.lang.Long = null

  def isActive = activationToken.isEmpty

  def activate = activationToken = ""
}